package com.tramy.hpush.server;

import com.google.gson.Gson;

public class GsonUtils {

    private static final Gson gson;

    static {
        gson = new Gson();
    }

    private GsonUtils() {

    }

    public static <T> T jsonToPojo(String json, Class<T> type) {
        return gson.fromJson(json, type);
    }

    public static String toJson(Object pojo) {
        return gson.toJson(pojo);
    }

}
